import 'package:flutter/material.dart';

class SearchBar extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[
        Stack(
          alignment: Alignment.topRight,
          children: <Widget>[
            ClipOval(
//          child: Image.network("https://p0.ssl.qhimg.com/t0183421f63f84fccaf.gif",width: 40,height: 40,),
              child: Image.asset(
                "images/my_header.png",
                width: 40,
                height: 40,
              ),
            ),
            Container(
              width: 9,
              height: 9,
              decoration: BoxDecoration(
                  color: Colors.red,
                  shape: BoxShape.circle,
                  border: Border.all(color: Colors.white, width: 1)),
            )
          ],
        ),
        Expanded(child: TitleSearchWidget()),
        Icon(
          Icons.airplay,
          size: 30,
          color: Colors.white54,
        ),
      ],
    );
  }
}

class TitleSearchWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(left: 10, right: 10),
      alignment: Alignment.centerLeft,
      padding: EdgeInsets.only(left: 10),
      child: Icon(Icons.search),
      width: 200,
      height: 40,
      decoration: BoxDecoration(
          color: Colors.white54,
          borderRadius: BorderRadius.all(Radius.circular(50))),
    );
  }
}
